﻿@model PaggerApplication.Models.PageViewModel<PaggerApplication.Models.ProductModel>
@{
    ViewBag.Title = "PrevNext";
    Layout = "~/Views/Shared/_HtmlLayout.cshtml";
}
<h2>
    PrevNext Pagger - GET</h2>
<table>
    <thead>
        <tr>
            <th>
                ID
            </th>
            <th>
                Name
            </th>
            <th>
                Specification
            </th>
            <th>
                Price
            </th>
            <th>
                Count
            </th>
        </tr>
    </thead>
    <tbody>
        @if (Model.Data != null && Model.Data.Count() > 0) {
            foreach (var product in Model.Data) {
            <tr>
                <td>@product.ID
                </td>
                <td>@product.Name
                </td>
                <td>@product.Specification
                </td>
                <td>@String.Format("{0:c2}", product.Price)
                </td>
                <td>@product.Count
                </td>
            </tr>
            }
        }
    </tbody>
</table>
@Html.Pagger(Model.RowCount, Model.PageIndex, Model.PageSize, HtmlPaggerType.PrevNext, HttpMethod.GET, PageButtonLabel.Default)
